package com.qqtop10.manager.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qqtop10.manager.dao.OrderMapper;
import com.qqtop10.manager.model.Order;
import com.qqtop10.manager.model.OrderKey;
import com.qqtop10.manager.model.Statistical;
import com.qqtop10.manager.service.OrderService;

/**
 * 
 * @author Jovi-林兆维
 * @date 2015年9月19日
 * @version 1.0
 *
 */
@Service("orderService")
public class OrderServiceImpl implements OrderService {

	@Autowired
	private OrderMapper orderMapper;

	@Override
	public int deleteByPrimaryKey(OrderKey key) {
		return orderMapper.deleteByPrimaryKey(key);
	}

	@Override
	public int insert(Order record) {
		return orderMapper.insert(record);
	}

	@Override
	public int insertSelective(Order record) {
		return orderMapper.insertSelective(record);
	}

	@Override
	public Order selectByPrimaryKey(OrderKey key) {
		return orderMapper.selectByPrimaryKey(key);
	}

	@Override
	public int updateByPrimaryKeySelective(Order record) {
		return orderMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Order record) {
		return orderMapper.updateByPrimaryKey(record);
	}

	@Override
	public Order selectById(Integer id) {
		return orderMapper.selectById(id);
	}

	@Override
	public Order selectByUuid(String uuid) {
		return orderMapper.selectByUuid(uuid);
	}

	@Override
	public List<Order> selectByUuids(List<String> uuid) {
		return orderMapper.selectByUuids(uuid);
	}

	@Override
	public List<Object> selectBySelective(Map<String, Object> map) {
		return orderMapper.selectBySelective(map);
	}

	@Override
	public int count(Map<String, Object> map) {
		return orderMapper.count(map);
	}

	@Override
	public int sendOutGoods(List<String> uuid) {
		return orderMapper.sendOutGoods(uuid);
	}

	@Override
	public int cancelOrder(List<String> uuid) {
		return orderMapper.cancelOrder(uuid);
	}

	@Override
	public int confirmOrder(List<String> uuid) {
		return orderMapper.confirmOrder(uuid);
	}

	@Override
	public boolean add(Order input) {
		return orderMapper.add(input) != 0;
	}

	@Override
	public int updateByUuidSelective(Order record) {
		return orderMapper.updateByUuidSelective(record);
	}

	@Override
	public int updateByUuid(Order record) {
		return orderMapper.updateByUuid(record);
	}

	@Override
	public List<Order> selectByPayid(String payid) {
		return orderMapper.selectByPayid(payid);
	}

	@Override
	public List<Statistical> statistical(Map<String, Object> map) {
		return orderMapper.statistical(map);
	}

	@Override
	public int paySeller(Order record) {
		return orderMapper.paySeller(record);
	}

	@Override
	public List<Order> selectAllUnReceiveOrder() {
		return orderMapper.selectAllUnReceiveOrder();
	}

}
